package vector;

import java.util.Vector;

public class vector extends Vector {
    
    public vector(String desc) {
        desc = "[" + desc + "]";
        this.desc = desc;
        id = oid++;
        aloc++;
        //System.out.println("VECTOR ALOC: " + id + " " + desc);
    }
    
    protected void finalize() {
        free++;
        //System.out.println("VECTOR FREE: " + id + " " + desc + " " + aloc + " " + free);
    }
    
    public vector clone() {
        int index;
        vector dst = new vector(desc + "'");
        
        for (index = 0; index < size(); index++) {
            dst.add(get(index));
        }
        
        return dst;
    }
  

    public String desc = "";
    public static int free = 0;
    public static int aloc = 0;
    public int        id;
    public static int oid = 0;
}